package org.hk.proxy.common.exception;


import org.hk.proxy.common.constant.ApiStateEnum;


public class ApiCommonException extends RuntimeException {
    private Integer code;
    private String msg;
    //填写state
    public ApiCommonException(ApiStateEnum apiStateEnum) {
        this.code = apiStateEnum.getCode();
        this.msg=apiStateEnum.getName();
    }
    public ApiCommonException(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    @Override
    public String getMessage() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
